<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class AatestOrder extends Model
{
    
    protected $table = 'logistics_callback';

    protected $primaryKey = 'id';

    public $timestamps = false;

    protected $appends = ['update_time_format', 'operation'];

    public function getUpdateTimeFormatAttribute()
    {
        $result = $this->update_time ? date("Y-m-d H:i:s",$this->update_time):'';
        return $result;
    }

    public function getOperationAttribute()
    {
        $html  = "<i class='fa fa-edit' onclick=layInput('0','填入单号','/admin/orderupdate','{$this->id}','')></i>";
        return $html;
    }
}
